{block name=partner}
<div id="partner_wrapper{$partnerno}" rel="{$partnerno}" class="partner sub-form">
	<div class="row" >
		<div class="col-sm-8">
			<fieldset>
				<legend style="font-size:17px;">
					<div id="partner_logo_{$partnerno}_preview">{if $partners.partner_logo}<img src="{$partners.partner_logo}" alt="{$partners.partner_alt}" height="50px" width="50px">{/if}</div>
					<div id="partner_name_{$partnerno}_preview">{if $partners.partner_name}{$partners.partner_name}{else}Partner #{$partnerno}{/if}</div>
				</legend>
			</fieldset>
		</div>
		<div class="col-sm-2">
			<a href="javascript:void(0);" class="btn btn-warning trainer-btn" onclick="togglePartner('{$partnerno}')">显示 / 隐藏</a>
		</div>
		<div class="col-sm-2">
			<a href="javascript:void(0);" class="btn btn-danger del-btn" onclick="deletePartner('partner_wrapper{$partnerno}')">删除</a>
		</div>
	</div>
	<div class="row partners" id="partner{$partnerno}">
		<div class="row form-group">
			<label class="col-sm-3 control-label" for="partner_logo">Logo<br><small>尺寸: 720px宽 * 720px高</small></label>
			<div class="col-sm-9">
				<input type="hidden" value="listing_id" name="default[partner_listing_id]" />
				<input type="hidden" value="partner_id" name="field[10][tbl_partner][{$partnerno}][id]" id="id" />
				<input type="hidden" value="{$partners.partner_id}" name="field[10][tbl_partner][{$partnerno}][partner_id]" class="key">
				<input type="hidden" value="{$partners.partner_listing_id}" name="field[10][tbl_partner][{$partnerno}][partner_listing_id]" id="partner_listing_id" class="key">
				
				<input type="hidden" value="{$partners.partner_logo}" name="field[10][tbl_partner][{$partnerno}][partner_logo]" id="partner_logo_{$partnerno}_link" class="fileinput"> 
				<span class="file-view" id="partner_logo_{$partnerno}_path">{if $partners.partner_logo}<a href="{$partners.partner_logo}" target="_blank" >查看</a>{else}暂无{/if}</span> 
				<a href="javascript:void(0);" class="btn btn-info marg-5r"
					onclick="getFileType('partner_logo_{$partnerno}','','');"
				>选择文件</a> 
				<a href="javascript:void(0);" class="btn btn-info"
					onclick="
						$('#partner_logo_{$partnerno}').val('');
						$('#partner_logo_{$partnerno}_link').val('');
						$('#partner_logo_{$partnerno}_path').html('None');
						$('#partner_logo_{$partnerno}_preview').html('');
					"
				>移除文件</a>
			</div>
		</div>
		<div class="row form-group">
			<label class="col-sm-3 control-label" for="partner_name_{$partnerno}">名称</label>
			<div class="col-sm-5">
				<input class="form-control" type="text" value="{$partners.partner_name}" name="field[10][tbl_partner][{$partnerno}][partner_name]" id="partner_name_{$partnerno}" onchange="$('#partner_name_{$partnerno}_preview').html(this.value);">
			</div>
		</div>
		<div class="row form-group">
			<label class="col-sm-3 control-label" for="partner_description_{$partnerno}">描述</label>
			<div class="col-sm-5">
				<textarea class="form-control" maxlength="125" name="field[10][tbl_partner][{$partnerno}][partner_description]" id="partner_description_{$partnerno}" >{$partners.partner_description}</textarea>
			</div>
		</div> 
		<div class="row form-group">
			<label class="col-sm-3 control-label" for="partner_website_{$partnerno}">网址 <br> <small>包括 'http://' or 'https://'</small></label>
			<div class="col-sm-5">
				<input class="form-control" type="text" value="{$partners.partner_website}" name="field[10][tbl_partner][{$partnerno}][partner_website]" id="partner_website_{$partnerno}" >
			</div>
		</div>
		<div class="row form-group">
			<label class="col-sm-3 control-label" for="partner_order_{$partnerno}">订单</label>
			<div class="col-sm-5">
				<input class="form-control number" type="text" value="{$partners.partner_order}" name="field[10][tbl_partner][{$partnerno}][partner_order]" id="partner_order_{$partnerno}" >
			</div>
		</div>
	</div>
</div>
{/block}